home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15312 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.sunquest.com!kitk!kitk
  2. From: kitk@mudshark.sunquest.com (Kit Kauffmann)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Derivation and calling virtual functions
  5. Date: Thu, 4 Apr 1996 13:01:42
  6. Organization: Sunquest
  7. Message-ID: <kitk.2164.000D07B0@mudshark.sunquest.com>
  8. References: <graphix.828032689@spiff.cc.iastate.edu> <4jeulg$n9v@crc-news.doc.ca> <315F5B3E.E384E7C@alcyone.com>
  9. NNTP-Posting-Host: kkauffma.sunquest.com
  10. X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
  11.  
  12. In article <315F5B3E.E384E7C@alcyone.com> Erik Max Francis <max@alcyone.com> writes:
  13.  
  14. >Slobodan Celenkovic wrote:
  15.  
  16. >> Don't you need virtual keywords in Derived as well?
  17.  
  18. >No, unless you intend to override those functions in _further_ subclasses.
  19.  
  20. >-- 
  21. >Erik Max Francis &tSftDotIotE && http://www.alcyone.com/max && max@alcyone.com
  22. >San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
  23. >H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
  24. >Omnia quia sunt, lumina sunt. && Dominion, GIGO, GOOGOL, Omega, Psi, Strategem
  25. >"Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_
  26.  
  27. I don't think that is true - only the first declaration must say virtual - all 
  28. derived classes, regardless of how many levels of derivation there are, see 
  29. that method as virtual.
  30.  
  31. I like to use it in all derived classes for documentation purposes, but it is 
  32. optional, AFAIK
  33.  
  34.  
  35. Kit Kauffmann - kitk@mudshark.sunquest.com
  36. AKA 73363,447 (Compu$erve)
  37.  
  38. Finger me for my public key
  39.